#include<bits/stdc++.h> 

using namespace std;

int main( )
{
    int m, n;
    cin >> m >> n;
    int maxn=max(m, n);
    cout <<maxn*maxn-m*n << endl;
    return 0;
}